# $Id$
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>

pkgname=kdevelop
pkgver=5.1.2
pkgrel=2
pkgdesc='C++ IDE using KDE technologies based on KDevelop Platform'
arch=(i686 x86_64)
url='http://www.kdevelop.org/'
license=(GPL)
depends=(kdevplatform clang libksysguard)
makedepends=(extra-cmake-modules kdoctools kdevelop-pg-qt llvm qt5-tools plasma-framework krunner okteta python mesa)
optdepends=('konsole: embedded terminal'
	'git: Git support'
	'subversion: SVN support'
	'cvs: CVS support'
	'gdb: GNU debugger support'
        'lldb: LLDB debugger support'
	'qt5-doc: Qt documentation integration'
	'cmake: cmake integration'
	'qt5-tools: qthelp plugin'
 	'okteta: hex editor integration'
	'plasma-framework: for the plasma addons'
        'cppcheck: code analyzer')
conflicts=(kdevelop-qmljs)
replaces=(kdevelop-qmljs)
source=("https://download.kde.org/stable/$pkgname/$pkgver/src/$pkgname-$pkgver.tar.xz"{,.asc})
sha1sums=('5310577ff6c774e4c68fbd55e646ca99bc2fdd2e'
          'SKIP')
validpgpkeys=('329FD02C5AA48FCC77A4BBF0AC44AC6DB29779E6') # Sven Brauch <mail@svenbrauch.de>

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../$pkgname-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_TESTING=OFF
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir" install
}
